<extend name="Base/common"/>
<block name="style">
    <link href="__CSS__/store.css" type="text/css" rel="stylesheet">
</block>
<block name="header">
    <include file="Public/nav"/>
</block>
<block name="body">
    <!--导航栏end-->

    <div class="mb10 clearfix ">
        <include file="Public/_hot_sell"/>
        <div class="col-xs-3 ">
            <div class="common_block_border">
                <div class="content ">
                    <ul class="menu-one">
                        <volist name="cats" id="vo">
                            <php>
                                if($i == 1){
                                $class='firstChild';
                                }else{
                                $class='';
                                }
                                if($vo['id'] == $top_id ){
                                $class.=' menu-show';
                                }
                            </php>
                            <li class="{$class}">
                                <div class="header">
                                    <a href="{:U('store/Index/li',array('type'=>$vo['id'],'name'=>'good'))}"
                                       class="txt">{$vo.title}</a><span class="txt open">[子分类]</span>
                                    <span class="open arrow"></span>
                                </div>
                                <ul class="menu-two"
                                <if condition="$vo['id'] eq $top_id">style="display:block"</if>
                                >
                                <volist name="vo['children']" id="cd">
                                    <php>
                                        if($i == 1){
                                        $class='firstChild';
                                        }else{
                                        $class='';
                                        }
                                    </php>
                                    <li class="{$class}"><a
                                            href="{:U('store/Index/li',array('type'=>$cd['id'],'name'=>'good'))}">{$cd.title}</a>
                                    </li>
                                    <volist name="cd['children']" id="ccd">
                                        <php>
                                            if($i == 1){
                                            $class='firstChild';
                                            }else{
                                            $class='';
                                            }
                                        </php>
                                        <li class="{$class}"><a
                                                href="{:U('store/Index/li',array('type'=>$ccd['id'],'name'=>'good'))}">
                                            &nbsp;&nbsp;&nbsp; · {$ccd.title}</a></li>
                                    </volist>
                                </volist>
                    </ul>
                    </li>
                    </volist>


                    </ul>
                </div>
            </div>
            <style>

            </style>
            <script>
                $(document).ready(function () {
                    var aMenuOneLi = $(".menu-one > li");
                    var aMenuTwo = $(".menu-two");
                    $(".menu-one > li > .header .open").each(function (i) {
                        i=parseInt((i)/2);
                        $(this).click(function () {
                            if ($(aMenuTwo[i]).css("display") == "block") {
                                $(aMenuTwo[i]).slideUp(300);
                                $(aMenuOneLi[i]).removeClass("menu-show")
                            } else {
                                for (var j = 0; j < aMenuTwo.length; j++) {
                                    $(aMenuTwo[j]).slideUp(300);
                                    $(aMenuOneLi[j]).removeClass("menu-show");
                                }
                                $(aMenuTwo[i]).slideDown(300);
                                $(aMenuOneLi[i]).addClass("menu-show")
                            }
                        });
                    });
                });
            </script>

        </div>
        <div class="col-xs-9 mb10">
            <div class=" common_block_border clearfix">
                <div class="clearfix">
                    <div class="pull-left" style="padding: 10px">{$type.title}</div>
                    {:W('InfoList/render',array(array('num'=>16,'class'=>'store_ul_info','type'=>'list','num'=>12,'map'=>array('type'=>$type['id']))))}
                </div>
            </div>
        </div>

        <div>

            <div class="clearfix"></div>
        </div>
        <div class="clearfix"></div>

    </div>
    </div>
</block>